# -*- coding: utf-8 -*-
# @Author : Yuan
from rest_framework.generics import ListAPIView
from rest_framework.viewsets import ModelViewSet
from apps.goods.models import SpecificationOption, SPUSpecification
from apps.meiduo_admin.serializers.specoption import SpecificationOptionModelSerializer
from apps.meiduo_admin.serializers.specoption import SPUSpecificationModelSerializer
from apps.meiduo_admin.utils import PageNum


class SpecificationOptionModelViewSet(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = SpecificationOptionModelSerializer
    pagination_class = PageNum


class SPUSpecificationModelListView(ListAPIView):
    queryset = SPUSpecification.objects.all()
    serializer_class = SPUSpecificationModelSerializer


